package com.lyj.io.module.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 权限
 * @author: 李亚杰
 * @version: 1.0
 * @date: 2021/8/19 14:54
 */
@ApiModel("权限表")
@Data
@TableName("sys_permission")
public class SysPermission implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 权限ID
     */
    @ApiModelProperty(value = "权限ID", example = "")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 权限名称
     */
    @ApiModelProperty(value = "权限名称", example = "")
    private String permission;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", example = "")
    private String roleId;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", example = "")
    private Long creater;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "")
    @TableField(value = "CREATE_DATE", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createDate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", example = "")
    @TableField(value = "UPDATE_DATE", fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date updateDate;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", example = "")
    private String remark;

    /**
     * 删除标识
     */
    @ApiModelProperty(value = "删除标识,默认为0", example = "")
    private String deleteFlag;
}
